<script setup>
import {ref} from "vue";

let score = ref(110);

function modifyScore(){
  if (score.value > 100) {
    score.value = 100
  }
  if (score.value < 0) {
    score.value = 0
  }
}
</script>

<template>
  <input @blur="modifyScore" type="text" v-model.lazy="score">
  <div v-if="score >= 90">优秀</div>
  <div v-else-if="score >= 70">良好</div>
  <div v-else-if="score >= 60">及格</div>
  <div v-else>不及格</div>
</template>


<style scoped>

</style>
